Method: Color::Palette::AdobeColor#[]
- Defined in:
- lib/color/palette/adobecolor.rb
permalink #[](key) ⇒ Object
If a Numeric key
is provided, the single colour value at that position will be returned. If a String key
is provided, the colour set (an array) for that colour name will be returned.
188 189 190 191 192 193 194 |
# File 'lib/color/palette/adobecolor.rb', line 188 def [](key) if key.kind_of?(Numeric) @colors[key] else @names[key] end end |